package uk.co.cocking.getinline2.io.helpers;

import uk.co.cocking.getinline2.record.StringField;
import uk.co.cocking.getinline2.record.MapRecord;
import uk.co.cocking.getinline2.record.Record;

public class RssRecordBuilder {

   private String title;
   private String link;
   private String description;
   private String guid;

   public RssRecordBuilder withTitle(String title) {
      this.title = title;
      return this;
   }
   
   public RssRecordBuilder withLink(String link) {
      this.link = link;
      return this;
   }
   
   public RssRecordBuilder withDescription(String description) {
      this.description = description;
      return this;
   }
   
   public RssRecordBuilder withGuid(String guid) {
      this.guid = guid;
      return this;
   }

   public Record build() {
      return new MapRecord(
            new StringField("title", title),
            new StringField("link", link),
            new StringField("description", description),
            new StringField("guid", guid));
   }


}
